1. Field of the Invention
The present invention relates generally to data networks, and more specifically to a load balancing technique implemented in a data network device utilizing a data cache
2. Description of the Related Art
Content providers on the World Wide Web are willing to pay a great deal of money to ensure that their information is provided quickly and efficiently to any given client or user. Recently, there has been a great deal of research effort directed at reducing network congestion and increasing server response time. One particular area which has received much attention relates to load balancing techniques for network traffic.
FIG. 1 shows a schematic block diagram of a conventional load balancing implementation which may be used to increase server response time to a given user. In the example of FIG. 1, a client or user 102 desires to access a specific web page associated with a specific URL such as, for example, www.yahoo.com. As shown in FIG. 1, the content provider associated with the desired URL has implemented a load balanced host server system 130 which includes a load balancing device 104, a farm of web servers 110, and a centralized database 120. Each server 110a, 110b, 110n of the server farm 110 includes identical content corresponding to the content provider's entire web site. When the user 102 attempts to access the content provider's web site, via gateway device 106 and the Internet 108, the user is first directed to the load balancing device 104. The load balancing device then dynamically determines which server of the server farm 110 is the least busy, and forwards the client request to the identified server. Thus, for example, if the load balancing device 104 determines that Server A 110a is the least busy, the load balancing device will forward the client request (e.g., client HTTP request) to Server 110a.Server 110a then generates a response to the client request, and transmits the response to load balancing device 104, where it is then forwarded to the client 102. Each time the client transmits an HTTP request to the load balancing device 104, the load balancing device selects an appropriate (e.g., least busy) server of the server farm 110 to respond to the client request. Moreover, since the content on each server is identical, more than one server may be used for responding to requests from a particular client. Further, it will be appreciated that the host server system 130 also provides fail over protection by way of multiple redundant servers (e.g., 110a, 110b, 110n).
Implementing State In TCP
As commonly known to one having ordinary skill in the art, TCP (Transmission Control Protocol) is a stateless protocol. Thus, in order to implement state over TCP/IP, content providers conventionally use a “cookie file” file to maintain state information for a given client. Typically, the cookie file will be transmitted to the client where it is then stored on the client machine. When the client machine accesses a particular web server, the web server retrieves the appropriate cookie file data from the client machine in order to properly respond to the client. According to one conventional technique, the client cookie file will include all necessary state information relating to the client's current session with the web server. This implementation may be useful in situations where there is a relatively small amount of state information to be stored in the cookie file. However, problems may be encountered when there is a relatively large amount of state or other information to be stored in the cookie file. For example, if the user accesses an electronic commerce site such as, for example, an on-line grocery store, the user may select dozens or even hundreds of items to add to his or her electronic shopping cart. Each time the user adds a new item to the electronic shopping cart, the state information for that user needs to be updated to include the new item. Moreover, a new cookie file which includes the updated state information (including the updated contents of the user's shopping cart) must be transmitted back to the user's computer. This may result in a significant decrease in response time as experienced by the user. Further, as the user continues to add new items to the shopping cart, the relative response time experienced by the user may continue to decrease.
A second conventional technique for implementing state over TCP/IP provides that the state information relating to a particular client session be stored in a database on the host server system. According to this later technique, when the client first accesses the host server system 130, a session ID is generated for that client session. The session ID is then stored in a cookie file on the client machine 102. The state information corresponding to that client session is stored on the host server database 120, and may be accessed using the session ID. Thereafter, during the client session, each time the client accesses the host server system 130, the assigned host server from the server farm 110 will retrieve the session ID data from the cookie file stored on the client machine, and, using the session ID, will retrieve the appropriate state information from database 120. Thus, according to this technique, when a client adds a new item to his or her shopping cart, for example, the assigned host server will update the client's state information stored on database 120.
Although the later-described technique for implementing state over TCP/IP reduces the amount of data to be written to the client cookie file, it necessarily involves accessing the database 120 each time one of the farm servers 110 desires to read or write state information relating to a particular client session ID. This results in a decreased response time from the host server system 130, as experienced by the user 102. Accordingly, there exists a continual need to improve upon network load balancing and fail over protection techniques.